var form_validation = function () {
    var e = function () {
        jQuery(".form-valide").validate({
            ignore: [],
            errorClass: "invalid-feedback animated fadeInDown",
            errorElement: "div",
            errorPlacement: function (e, a) {
                jQuery(a).parents(".form-group > div").append(e)
            },
            highlight: function (e) {
                jQuery(e).closest(".form-group").removeClass("is-invalid").addClass("is-invalid")
            },
            success: function (e) {
                jQuery(e).closest(".form-group").removeClass("is-invalid"), jQuery(e).remove()
            },

            rules: {
                "val-deptname": {
                    required: !0,
                },
                "val-companyname": {
                    required: !0,
                },
                "val-username": {
                    required: !0,
                    minlength: 2,

                },
                "val-phone": {
                    required: true,
                    digits: true,
                    rangelength: [12, 12]

                },
                "val-skill": {
                    required: true
                }
            },
            messages: {
                "val-deptname": {
                    required: "部门名称不能为空",
                    minlength: "长度至少为4位"
                }, "val-companyname": {
                    required: "公司名称不能为空",
                    minlength: "长度至少为4位"
                },
                "val-username": {
                    required: "创始人不能为空",
                    minlength: "长度至少为2位",

                },
                "val-phone": {
                    required: "手机号不能为空",
                    rangelength: "长度为11位",
                    digits: "请输入正确的手机号码"
                },
                "val-skill": {
                    required: "内容不能为空",
                }

            },

        });
    }
    return {
        init: function () {
            e(), a(), jQuery(".js-select2").on("change", function () {
                jQuery(this).valid()
            })
        }
    }
}();
jQuery(function () {
    form_validation.init()
});